#include "Stdafx.h"
#include "DirectInputDevice8.h"

using namespace Vortex::Wrapper::DInput;

DirectInputDevice8::DirectInputDevice8(IDirectInputDevice8W* handle) : _handle (handle) {
}

DirectInputDevice8::~DirectInputDevice8() {
	_handle->Release();
}

HResult DirectInputDevice8::Acquire() {
	return HResult(_handle->Acquire());
}

HResult DirectInputDevice8::SetCooperativeLevel(IntPtr hWnd, DICooperativeLevel coopLevel) {
	return HResult(_handle->SetCooperativeLevel((HWND)hWnd.ToPointer(), (DWORD)coopLevel));
}